package com.hc.demo_api820.service;

import com.hc.demo_api820.domain.Orders;
import com.hc.demo_api820.dto.ResultResponse;
import org.springframework.data.relational.core.sql.In;
import org.springframework.transaction.annotation.Transactional;

public interface OrdersService {
    @Transactional
        //开启事务注解，确保整个操作符合事务的四个特征：原子性，一致性，持久性，隔离性
    ResultResponse careateOrders(Orders orders);

    ResultResponse queryOrderByUserId(String userId);

    //取消订单的方法
    ResultResponse cancelAppointment(Integer orderId);
}
